package com.jifeng.sterilizer.exception.handler;

import com.jifeng.sterilizer.utils.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author JiFeng
 */
@RestControllerAdvice
public class GlobalException {

    @ExceptionHandler(Exception.class)
    public R handleException(Exception e){
        return R.error(500,"服务器开小差啦...");
    }

}
